Skip to main content

Device Information API

Access basic device details in your universal app using the Device Information API. This API provides essential device characteristics including hardware specifications and display properties.

API Usage

Initialization Method

const { getDeviceInfo } = WebBridge.init()
const deviceInfo = await getDeviceInfo();

Direct Access Method

const { getDeviceInfo } = window.WebBridge;
const deviceInfo = await getDeviceInfo();

Response Format

The getDeviceInfo() method returns an object with the following keys:

{
model: "Pixel 10", // Device model name
manufacturer: "Google", // Device manufacturer
platform: "android", // Operating system platform
screenWidth: 393, // Screen width in pixels
screenHeight: 852, // Screen height in pixels
screenDensity: 3.0 // Screen pixel density
}